home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
a_utils
/
expanded.lha
/
expanded
/
src
/
Typeout.C
< prev
Wrap
C/C++ Source or Header
|
1992-03-19
|
5KB
|
239 lines
//
// Linear-Affine-Projective Geometry Package
//
// Typeout.C
//
// $Header$
//
// William J.R. Longabaugh
// University of Washington
//
// Implementation of the linear-affine-projective geometry
// package described in William J.R. Longabaugh, "An Expanded
// System for Coordinate-Free Geometric Programming", Master's
// thesis, University of Washington, 1992.
//
// Copyright (c) 1992, William J.R. Longabaugh
// Copying, use and development for non-commercial purposes permitted.
// All rights for commercial use reserved.
// This software is unsupported and without warranty; it is
// provided "as is".
//
// ***********************************************************************
#include <string.h>
#include "Typeout.h"
// ***********************************************************************
//
// Implement stream output functions for the enumerated types.
//
// ***********************************************************************
ostream& SpaceTypeOut(ostream &c, SpaceType t)
{
switch (t) {
case NULL_SPACE:
c << "Null space ";
break;
case VEC_SPACE:
c << "Vector space ";
break;
case AFF_SPACE:
c << "Affine space ";
break;
case PROJ_SPACE:
c << "Projective space ";
break;
case ANY_SPACE:
c << "Any space ";
break;
default:
c << "Unrecognized space type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& BasisTypeOut(ostream &c, BasisType t)
{
switch (t) {
case NULL_BASIS:
c << "Null basis ";
break;
case SIMPLEX:
c << "Simplex ";
break;
case FRAME:
c << "Frame ";
break;
case VBASIS:
c << "Vector basis ";
break;
case HFRAME:
c << "Projective frame ";
break;
case ANY_BASIS:
c << "Any basis ";
break;
default:
c << "Unrecognized basis type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& GeObTypeOut(ostream &c, GeObType t)
{
switch (t) {
case NULL_GEOB:
c << "Null geometric object ";
break;
case VECTOR:
c << "Vector ";
break;
case AFF_POINT:
c << "Affine point ";
break;
case AFF_VECTOR:
c << "Affine vector ";
break;
case VEC_EC:
c << "Vector equivalence class ";
break;
case AFF_VEC_EC:
c << "Affine vector equivalence class ";
break;
case PROJ_POINT:
c << "Projective point ";
break;
case ANY_GEOB:
c << "Any geometric object ";
break;
default:
c << "Unrecognized geometric object type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& MapTypeOut(ostream &c, MapType t)
{
switch (t) {
case NULL_MAP:
c << "Null map ";
break;
case LIN_MAP:
c << "Linear map ";
break;
case AFF_MAP:
c << "Affine map ";
break;
case PROJ_MAP:
c << "Projective map ";
break;
case ANY_MAP:
c << "Any map ";
break;
default:
c << "Unrecognized map type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& MultiTypeOut(ostream &c, MultiType t)
{
switch (t) {
case NULL_MULTI:
c << "Null multimap ";
break;
case MULTI_LINEAR:
c << "Multi-linear map ";
break;
case MULTI_AFFINE:
c << "Multi-affine map ";
break;
case ANY_MULTI:
c << "Any multimap ";
break;
default:
c << "Unrecognized multimap type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& SubSetTypeOut(ostream &c, SubSetType t)
{
switch (t) {
case NULL_SUBSET:
c << "Null subset ";
break;
case LINEAR_SUBSET:
c << "Vector subset ";
break;
case AFFINE_SUBSET:
c << "Affine subset ";
break;
case PROJECTIVE_SUBSET:
c << "Projective subset ";
break;
case ANY_SUBSET:
c << "Any subset ";
break;
default:
c << "Unrecognized subset type ";
break;
}
return (c);
}
// ***********************************************************************
ostream& SRelOut(ostream &c, SRel t)
{
switch (t) {
case LINEARIZATION:
c << "Linearization space ";
break;
case AFFINE:
c << "Affine space ";
break;
case TANGENT:
c << "Tangent vector space ";
break;
case PROJECT_COMP:
c << "Projective completion space ";
break;
case LIN_DUAL:
c << "Dual to linearization space ";
break;
case TANG_DUAL:
c << "Dual to tangent vector space ";
break;
case NO_RELATION:
c << "No relation ";
break;
case SAME_SPACE:
c << "Same space ";
break;
default:
c << "Unrecognized space relation ";
break;
}
return (c);
}